<?php

class ShowUserAction extends CAction
{
	public function run()
	{
		if(Yii::app()->user->isGuest){
			$this->controller->redirect(array('login'));
		}
		else{
			$user=&$this->controller->getUser();
			if($user===null)
				throw new CHttpException(500,'cannot find user['.Yii::app()->user->name.']');
			$this->controller->render('ShowUser',array('user'=>$user));
		}
	}
}
